tests: Test pull behaviour when network timeouts occur
authorPhilip Withnall <withnall@endlessm.com>
Mon, 28 May 2018 15:25:53 +0000 (16:25 +0100)
committerAtomic Bot <atomic-devel@projectatomic.io>
Wed, 30 May 2018 16:23:57 +0000 (16:23 +0000)
commitc9619a490490a8ed29ea002a2f358bbebfb80ef4
treea193b3eac1e649898572be05751b1717d1649c43
parent97c348d65b989993cdf995e37a28936faa4ec1b2
tests: Test pull behaviour when network timeouts occur

Extend test-pull-repeated.sh to test error 408 as well as error 500, to
ensure that the new retry-on-network-timeout code in ostree-repo-pull.c
correctly retries.

Rather than the 200 iterations needed for the error 500 tests, only do 5
iterations. The pull code internally does 5 retries (by default), which
means a full iteration count of 25. That seems to be sufficient to make
the tests reliably pass, in my testing — we can always bump it up to 200
/ 5 = 40 in future if needed (to put it in parity with the error 500
tests).

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Closes: #1594
Approved by: jlebon
tests/test-pull-repeated.sh